﻿<Window x:Class="RoughBrowser.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:mode="clr-namespace:RoughBrowser"
        Title="MainWindow" Height="350" Width="525">
    <Grid x:Name="pnlMain">
        <Grid.Resources>
            <HierarchicalDataTemplate x:Key="styleTree" DataType="{x:Type mode:Node}" ItemsSource="{Binding Children}">
                <StackPanel>
                    <TextBlock Text="{Binding NodeTitle}" ToolTip="{Binding NodeTitle}" Tag="{Binding NodeTitle}"/>
                </StackPanel>
            </HierarchicalDataTemplate>
        </Grid.Resources>
        <Grid.RowDefinitions>
            <RowDefinition Height="30"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Grid Grid.Row="0">
            <Grid Margin="0,0,0,0" >
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="70" />
                </Grid.ColumnDefinitions>
                <TextBox x:Name="txtUrl" Grid.Column="0" Margin="0,0,0,0" HorizontalAlignment="Stretch" />
                <Button x:Name="btnSearch" Grid.Column="1"  Content="Search" Click="btnSearch_Click" />
            </Grid>
        </Grid>
        <Grid Grid.Row="1">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="0.4*" />
                <ColumnDefinition Width="0.6*" />
            </Grid.ColumnDefinitions>
            <Grid Background="LightSlateGray" Grid.Row="0" Grid.Column="0" Margin="0,0,10,0">
                <TreeView Margin="0" HorizontalAlignment="Stretch" x:Name="treeStruct" VerticalAlignment="Stretch"  ItemTemplate="{StaticResource styleTree}"  />
            </Grid>
            <GridSplitter Name="gridSplitter1"  Width="10"  />
            <Grid Grid.Column="1" Grid.Row="0">
                <Grid.RowDefinitions>
                    <RowDefinition Height="0.6*"/>
                    <RowDefinition Height="0.4*"/>
                </Grid.RowDefinitions>
                <Label Grid.Row="0" Grid.Column="0" Width="60" Height="60" HorizontalAlignment="Center" VerticalAlignment="Center" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Background="HotPink">Row1</Label>
                <GridSplitter Height="5" HorizontalAlignment="Stretch" VerticalAlignment="Bottom"></GridSplitter>
                <Label Grid.Row="1" Grid.Column="0" Width="60" Height="60" HorizontalAlignment="Center" VerticalAlignment="Center" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Background="HotPink">Row2</Label>

            </Grid>

        </Grid>
    </Grid>
</Window>
